{% extends 'base.html' %}

{% block title %}
	主页
{% endblock %}


{% block content %}

	<!-- 输入组 -->
	<div class="container mt-4">
		<div class="row">
			<div class="col">

				<form action="{{ url_for('index') }}" method="get">
					<div class="mb-3">
						<label for="input" class="form-label h4">请输入城市名称, 多个城市可以用 / 隔开</label>
						<div class="input-group mb-3">
							<input type="text"
							       class="form-control"
							       placeholder="例如: 广州/北京/上海/深圳"
							       id="input"
							       name="cities"
							       value="{{ cities_str }}"
							>
							<button class="btn btn-outline-info" type="submit" id="button-addon2">
								<i class="bi-search"></i>
							</button>
						</div>

					</div>
				</form>
			</div>
		</div>
	</div>

	<!-- 参数描述 -->
	<div class="container">
		<div class="row">
			<div class="col text-end">
				<a class="text-decoration-none" href="{{ url_for('describe') }}">参数描述</a>
			</div>
		</div>
	</div>

	<!-- 列表组 -->
	<div class="container mt-3">
		<div class="row">
			<div class="col">
				<ul class="list-group">

					{% for city in cities_list %}
						<li class="list-group-item">
							<span>{{ city }}</span>
							<a class="mx-5" href="{{ url_for('detail', city=city) }}">详细数据</a>
							<a href="{{ url_for('api_data', city=city) }}">API数据</a>
						</li>
					{% endfor %}

				</ul>
			</div>
		</div>
	</div>

{% endblock %}